package com.bgrconsulting.stockorderentry.service.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.xml.bind.annotation.XmlRootElement;

import com.google.appengine.api.datastore.Key;

@XmlRootElement(name = "marginBalance")
@PersistenceCapable
public class MarginAccountBalance {
	
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
	
	@Persistent
	private String accountId;
	
	@Persistent
	private String masterAccount;
	
	@Persistent
	private DTBalance dtBalance;
	
	@Persistent
	private Double fedCall;
	
	@Persistent
	private Double marginBalance;
	
	@Persistent
	private Double marginBalanceWithDrawal;
	
	@Persistent
	private Double marginEquity;
	
	@Persistent
	private Double marginableSecurities;
	
	@Persistent
	private Double maxAvailableForWithDrawal;
	
	@Persistent
	private Double minEquityCall;
	
	@Persistent
	private Double nonMarginableSecuritiesAndOptions;
	
	@Persistent
	private Double totalShortValue;
	
	@Persistent
	private Double shortReserve;
	
	public MarginAccountBalance(String accountId,
			String masterAccount,
			DTBalance dtBalance, 
			Double fedCall, 
			Double marginBalance,
			Double marginBalanceWithDrawal, 
			Double marginEquity, 
			Double marginableSecurities,
			Double maxAvailableForWithDrawal,
			Double minEquityCall,
			Double nonMarginableSecuritiesAndOptions,
			Double totalShortValue,
			Double shortResreve)
	{
		this.accountId = accountId;
		this.masterAccount = masterAccount;
		this.dtBalance = dtBalance;
		this.marginableSecurities = marginableSecurities;
		this.fedCall = fedCall;
		this.marginBalance = marginBalance;
		this.marginEquity = marginEquity;
		this.maxAvailableForWithDrawal = maxAvailableForWithDrawal;
		this.minEquityCall = minEquityCall;
		this.nonMarginableSecuritiesAndOptions = nonMarginableSecuritiesAndOptions;
		this.totalShortValue = totalShortValue;
		this.shortReserve = shortResreve;
	}
	
	public MarginAccountBalance() {
		
	}
	
	public void setMasterAccount(String masterAccount) {
		this.masterAccount = masterAccount;
	}
	
	public String getMasterAccount() {
		return this.masterAccount;
	}
	
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}
	
	public String getAccountId() {
		return this.accountId;
	}
	
	public void setDTBalance(DTBalance dtBalance) {
		this.dtBalance = dtBalance;
	}
	
	public DTBalance getDTBalance() {
		return this.dtBalance;
	}
	
	public void setFedCall(Double fedCall) {
		this.fedCall = fedCall;
	}
	
	public Double getFedCall() {
		return this.fedCall;
	}
	
	public void setMarginBalanceWithDrawal(Double marginBalanceWithDrawal) {
		this.marginBalanceWithDrawal = marginBalanceWithDrawal;
	}
	
	public Double getMarginBalanceWithDrawal() {
		return this.marginBalanceWithDrawal;
	}
	
	public void setMarginEquity(Double marginEquity) {
		this.marginEquity = marginEquity;
	}
	
	public Double getMarginEquity() {
		return this.marginEquity;
	}
	
	public void setMarginBalance(Double marginBalance) {
		this.marginBalance = marginBalance;
	}
	
	public Double getMarginBalance( ) {
		return this.marginBalance;
	}
	
	public void setMaxAvailableForWithDrawal(Double maxAvailableForWithDrawal) {
		this.maxAvailableForWithDrawal = maxAvailableForWithDrawal;
	}
	
	public Double getMaxAvailableForWithDrawal() {
		return this.maxAvailableForWithDrawal;
	}
	
	public void setMinEquityCall(Double minEquityCall) {
		this.minEquityCall = minEquityCall;
	}
	
	public Double setMinEquityCall() {
		return this.minEquityCall;
	}
	
	public void setNonMarginableSecuritiesAndOptions(Double nonMarginableSecuritiesAndOptions) {
		this.nonMarginableSecuritiesAndOptions = nonMarginableSecuritiesAndOptions;
	}
	
	public Double getNonMarginableSecuritiesAndOptions() {
		return this.nonMarginableSecuritiesAndOptions;
	}
	
	public void setMarginableSecurities(Double marginableSecurities) {
		this.marginableSecurities = marginableSecurities;
	}
	
	public Double getMarginableSecurities() {
		return this.marginableSecurities;
	}
	
	public void setTotalShortValue(Double totalShortValue) {
		this.totalShortValue = totalShortValue;
	}
	
	public Double getTotalShortValue() {
		return this.totalShortValue;
	}
	
	public void setShortReserve(Double shortReserve) {
		this.shortReserve = shortReserve;
	}
	
	public Double getShortReserve() {
		return this.shortReserve;
	}
	
	public void setKey(Key key) {
	    this.key = key;
	}
	
	public Key getKey() {
	    return this.key;
	}
}
